<template>
    <el-dialog :visible.sync="dialogTableVisible" :show-close="false" :center="true" :before-close="beforeClose" top="0">
        <viewer>
            <img :src="src">
        </viewer>
    </el-dialog>
</template>

<script>
export default {
    props: {
        src: {
            type: String,
            default: ""
        },
        dialogTableVisible: {
            type: Boolean,
            default: false
        }
    },
    methods:{
        beforeClose(){
            this.$emit("beforeClose")
        }
    }
}
</script>

<style lang="less" scoped>
:deep(.el-dialog) {
    max-width: 800px !important;
    height: 100vh !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: scroll;
    border: none;
    background: transparent;
    box-shadow: none !important;
}
:deep(.el-dialog::-webkit-scrollbar) {
    width: 0 !important;
    height: 0 !important;
}
:deep(.el-dialog__header) {
    padding: 0 !important;
}
:deep(.el-dialog__body) {
    padding: 0 !important;
}

</style>